import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: 'home'
    // component: HomeView
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home.vue'),
    redirect: '/home/goods',
    children:[
      {
        path:'goods',
        name:'goods',
        component: () => import('../views/goods/goods.vue')
      }
      ,
      {
        path:'classify',
        name:'classify',
        component: () => import('../views/classify/classify.vue')
      },
      {
        path:'cart',
        name:'cart',
        component: () => import('../views/cart/cart.vue')
      },
      {
        path:'mys',
        name:'mys',
        component: () => import('../views/mys/mys.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
